package org.testmyapp.entities;

import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.IdClass;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.ManyToOne;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.testmyapp.persistence.BusinessObjectMarker;

@Entity
@IdClass(ClaimDisqualifictationPk.class)
public class ClaimDisqualifictation extends AbsEntity implements BusinessObjectMarker {

	/**
	 * 
	 */
	private static final long serialVersionUID = -6153513713967692701L;
	
	public static String tableName = "ClaimDisqualifictation";
	
	@Id
	private int disqNr;
	@Id
	@ManyToOne
	@JoinTable(name = "tariffInstance_fk", joinColumns = {
			@JoinColumn(name = "ti_ip_fk", referencedColumnName = "ip_fk"),
			@JoinColumn(name = "ti_tarif_fk", referencedColumnName = "tarif_fk") })
	private TariffInstance tariffInstance;
	@Id
	@ManyToOne
	@JoinColumn(name = "claim_fk")
	private Claim claim;
	@Temporal(value = TemporalType.DATE)
	private Date beginDate;
	@Temporal(value = TemporalType.DATE)
	private Date endDate;
	public TariffInstance getTariffInstance() {
		return tariffInstance;
	}
	public void setTariffInstance(TariffInstance tariffInstance) {
		this.tariffInstance = tariffInstance;
	}
	public Claim getClaim() {
		return claim;
	}
	public void setClaim(Claim claim) {
		this.claim = claim;
	}
	public Date getBeginDate() {
		return beginDate;
	}
	public void setBeginDate(Date beginDate) {
		this.beginDate = beginDate;
	}
	public Date getEndDate() {
		return endDate;
	}
	public void setEndDate(Date endDate) {
		this.endDate = endDate;
	}
	public int getDisqNr() {
		return disqNr;
	}
	public void setDisqNr(int disqNr) {
		this.disqNr = disqNr;
	}

}
